-module(main_menu_controller).

-export([index/1]).

%% Obviously, we need different menus on different pages
%% secondary_menu might not be a good name, but it sort of conveys the idea
index(A) ->
    Appmod = yaws_arg:appmoddata(A),
	Path = string:tokens(Appmod, "/"),
	Length = length(Path),
	if
		Length >= 2 ->	
			Page = lists:nth(2, Path),
			{data, {wiki_menu, Page}};
		true ->
			{data, {wiki_menu, "main"}}
	end.